package com.gitee.webdav.kernel.serializer;

import com.gitee.webdav.common.XmlHelper;

import java.io.InputStream;

/**
 * @author hongda.li
 */
public class JacksonXmlSerializer implements XmlSerializer {
    @Override
    public <Bean> String toXml(Bean bean) {
        return XmlHelper.toXml(bean);
    }

    @Override
    public <Bean> Bean fromXml(String xml, Class<Bean> clazz) {
        return XmlHelper.fromXml(xml, clazz);
    }

    @Override
    public <Bean> Bean fromXml(InputStream stream, Class<Bean> clazz) {
        return XmlHelper.fromXml(stream, clazz);
    }
}
